#pragma once

#include "D3DManager.h"
#include <sstream>

using namespace std;

class TextFont
{
	D3DManager *d3dManager;
	ID3DXSprite *spriteManager;
	ID3DXFont *font;

public:
	enum Align { Center = DT_CENTER,Left = DT_LEFT,Right = DT_RIGHT };

	TextFont(void);
	~TextFont(void);

	void Create(String Font = "Times New Roman",unsigned short Size = 16,const Color &FontColor = Color(.9f,.9f,.9f,1));

	void Draw(String Text,const Vector2 &Position,Color color);
	void Draw(int Text,const Vector2 &Position,Color color);
	void Draw(unsigned Text,const Vector2 &Position,Color color);
	void Draw(short Text,const Vector2 &Position,Color color);
	void Draw(unsigned short Text,const Vector2 &Position,Color color);
	void Draw(float Text,const Vector2 &Position,Color color);
	void Draw(double Text,const Vector2 &Position,Color color);
	void Draw(unsigned char Text,const Vector2 &Position,Color color);
	void Draw(char Text,const Vector2 &Position,Color color);
	void Draw(long long Text,const Vector2 &Position,Color color);
	void Draw(unsigned long long Text,const Vector2 &Position,Color color);
	void Draw(const Vector2 &Text,const Vector2 &Position,Color color);
	void Draw(const Vector3 &Text,const Vector2 &Position,Color color);
	void DrawInRect(String Text,RECT &rect,Color fontColor,Align Alignment = Center);
	void DrawInRect(int Text,RECT &rect,Color fontColor,Align Alignment = Center);
	void DrawInRect(unsigned Text,RECT &rect,Color fontColor,Align Alignment = Center);
	void DrawInRect(short Text,RECT &rect,Color fontColor,Align Alignment = Center);
	void DrawInRect(unsigned short Text,RECT &rect,Color fontColor,Align Alignment = Center);
	void DrawInRect(float Text,RECT &rect,Color fontColor,Align Alignment = Center);
	void DrawInRect(double Text,RECT &rect,Color fontColor,Align Alignment = Center);
	void DrawInRect(unsigned char Text,RECT &rect,Color fontColor,Align Alignment = Center);
	void DrawInRect(char Text,RECT &rect,Color fontColor,Align Alignment = Center);
	void DrawInRect(long long Text,RECT &rect,Color fontColor,Align Alignment = Center);
	void DrawInRect(unsigned long long Text,RECT &rect,Color fontColor,Align Alignment = Center);
	void DrawInRect(const Vector2 &Text,RECT &rect,Color fontColor,Align Alignment = Center);
	void DrawInRect(const Vector3 &Text,RECT &rect,Color fontColor,Align Alignment = Center);
};

